package edu.gxmzu.task.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import edu.gxmzu.task.entity.Works;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface TaskMapper extends BaseMapper<Works> {


    @Delete("<script>" +
            "DELETE FROM works WHERE id IN " +
            "<foreach collection='list' item='taskId' open='(' close=')' separator=','>" +
            "#{taskId}" +
            "</foreach>" +
            "</script>")
    int deleteTask(@Param("list") List<String> ids);
}